import { ListColumns } from "@/api/interface/ListColumns";
import { EditColumns } from "@/api/interface/EditColumns";
import { requestSysDictionaryGetOptions } from "@/api/modules/sysDictionary";
	
	
	
	
	
	
	
	
	
	


//data.ts 该文件为自动生成，每次生成都会进行覆盖，请不要动该文件
export namespace SysDictionary {
//字段名称enum
export enum Fields {
	id="id",
	dic_value_type="dic_value_type",
	value_data_type="value_data_type",
	dic_key="dic_key",
	dic_value="dic_value",
	description="description",
	is_active="is_active",
	dic_sort="dic_sort",
	created_at="created_at",
	updated_at="updated_at",

}

//[列表]字段配置数据列表
export const listColumnsData: ListColumns = new ListColumns(
{ type: "selection", fixed: "left", width: 70 },
	{ prop: "id", label: "ID",  align: "",isShow: true,tag: true },
	{ prop: "dic_value_type", label: "字典值类型",  align: "",isShow: true,tag: true },
	{ prop: "value_data_type", label: "值类型",  align: "",isShow: true,tag: false },
	{ prop: "dic_key", label: "字典key",  align: "",isShow: true,tag: false },
	{ prop: "dic_value", label: "字典值",  align: "",isShow: true,tag: false },
	{ prop: "description", label: "描述",  align: "",isShow: true,tag: false },
	{ prop: "is_active", label: "是否启用",  align: "",isShow: true,tag: false ,enum: () => requestSysDictionaryGetOptions("")},
	{ prop: "dic_sort", label: "字典排序",  align: "",isShow: true,tag: false },
	{ prop: "created_at", label: "创建时间",  align: "",isShow: true,tag: false },
	{ prop: "updated_at", label: "更新时间",  align: "",isShow: true,tag: false },


{prop: "operation", label: "操作", fixed: "right"}
);

//[创建]表单列默认配置
export const CreateColumnsData: EditColumns = new EditColumns(
	{ type: "input", title: "字典值类型", col:{ span:12 }, field: "dic_value_type", effect:{},props: {},validate:[{required: true, message: "必填项：字典值类型(字符串类型)" }] },
	{ type: "input", title: "值类型", col:{ span:12 }, field: "value_data_type", effect:{},props: {},validate:[{required: true, message: "必填项：值类型(字符串类型)" }] },
	{ type: "input", title: "字典key", col:{ span:12 }, field: "dic_key", effect:{},props: {},validate:[{required: true, message: "必填项：字典key(字符串类型)" }] },
	{ type: "input", title: "字典值", col:{ span:12 }, field: "dic_value", effect:{},props: {},validate:[{required: true, message: "必填项：字典值(字符串类型)" }] },
	{ type: "input", title: "描述", col:{ span:12 }, field: "description", effect:{},props: {},validate:[{required: true, message: "必填项：描述(字符串类型)" }] },
	{ type: "switch", title: "是否启用", col:{ span:12 }, field: "is_active", effect:{},props: {},validate:[{required: true, message: "必填项：是否启用" }] },
	{ type: "inputNumber", title: "字典排序", col:{ span:12 }, field: "dic_sort", effect:{},props: {},validate:[{required: true, message: "必填项：字典排序(数字类型)" }] },

);

//[修改]表单列默认配置
export const UpdateColumnsData: EditColumns = new EditColumns(
	{ type: "hidden", title: "ID", col:{ span:12 }, field: "id", effect:{},props: {},validate:[{required: true, message: "必填项：ID(数字类型)" }] },
	{ type: "input", title: "字典值类型", col:{ span:12 }, field: "dic_value_type", effect:{},props: {},validate:[{required: true, message: "必填项：字典值类型(字符串类型)" }] },
	{ type: "input", title: "值类型", col:{ span:12 }, field: "value_data_type", effect:{},props: {},validate:[{required: true, message: "必填项：值类型(字符串类型)" }] },
	{ type: "input", title: "字典key", col:{ span:12 }, field: "dic_key", effect:{},props: {},validate:[{required: true, message: "必填项：字典key(字符串类型)" }] },
	{ type: "input", title: "字典值", col:{ span:12 }, field: "dic_value", effect:{},props: {},validate:[{required: true, message: "必填项：字典值(字符串类型)" }] },
	{ type: "input", title: "描述", col:{ span:12 }, field: "description", effect:{},props: {},validate:[{required: true, message: "必填项：描述(字符串类型)" }] },
	{ type: "switch", title: "是否启用", col:{ span:12 }, field: "is_active", effect:{},props: {},validate:[{required: true, message: "必填项：是否启用" }] },
	{ type: "inputNumber", title: "字典排序", col:{ span:12 }, field: "dic_sort", effect:{},props: {},validate:[{required: true, message: "必填项：字典排序(数字类型)" }] },

);
}

